Added wrapper around iframe to make it responsive.#243
Merged
Gaurav0 merged 1 commit intoember-cli:masterfrom Oct 27, 2015
Merged
Added wrapper around iframe to make it responsive.#243Gaurav0 merged 1 commit intoember-cli:masterfrom
Gaurav0 merged 1 commit intoember-cli:masterfrom
Conversation
Contributor
Author
|
I just noticed i needlessly changed a couple of lines. I saw later that the rest of the file uses single quotes so changed my doubles, changing a couple of originals as well. |
Contributor
There was a problem hiding this comment.
Many people who are embedding this in a page will want to specify the width and the height. How would they do this?
Contributor
Author
There was a problem hiding this comment.
By setting the width of the containing element, ie. what they're embedding it into. With this change, the iframe takes up the full width of the "column" it's in and the height adjusts proportionally. See here for more info on how this works.
As it stands now, users cannot set the dimensions of the iframe unless they edit the markup before pasting into their own document.
Contributor
|
👍 |
Gaurav0
added a commit
that referenced
this pull request
Oct 27, 2015
Added wrapper around iframe to make it responsive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #242. The embed markup includes a wrapper div and some minimal inline styles on both it and the iframe to allow it to use the full width of the containing element. I chose 16:9 ratio. I tried 4:3 but found it to be too tall. This could be configurable, although it would mean an extra step for the user in creating the embed code.